/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package model;

import java.io.Serializable;
import view.contact.SmallDisplay;


/**
 * Contact class allows to handle contact's information.
 * @author gramage
 */
public class Contact implements Serializable{

    /**
     * Name of the contact
     */
    protected String name;

    /**
     * First name of the contact
     */
    protected String firstName;

    /**
     * Home address of the contact
     */
    protected String homeAddress;

    /**
     * Personnal phone of the contact
     */
    protected String personalPhone;

    /**
     * Professionnal phone of the contact
     */
    protected String professionalPhone;

    /**
     * Home page of the contact
     */
    protected String homePage;

    /**
     * Email of the contact
     */
    protected String email;

    /**
     * Other infos of the contact
     */
    protected String other;

    /**
     * Links contact to his SmallDisplay
     */
    protected SmallDisplay sd;

    /**
     *
     * @return
     */
    public SmallDisplay getSd() {
        return sd;
    }

    /**
     *
     * @param sd
     */
    public void setSd(SmallDisplay sd) {
        this.sd = sd;
    }

    @Override
    public String toString() {
        return "Fiche de "+this.name+" "+this.firstName;
    }

    /**
     * Light constructor
     * @param name
     * @param firstName
     */
    public Contact(String name, String firstName) {
        this.name = name;
        this.firstName = firstName;
        this.homePage = "www.google.fr";
        this.email ="gogo@glo.gf";
    }

    /**
     * Constructor with all properties
     * @param name
     * @param firstName
     * @param homeAddress
     * @param personalPhone
     * @param professionalPhone
     * @param homePage
     * @param email
     * @param other
     */
    public Contact(String name, String firstName, String homeAddress, String personalPhone, String professionalPhone, String homePage, String email, String other) {
        this.name = name;
        this.firstName = firstName;
        this.homeAddress = homeAddress;
        this.personalPhone = personalPhone;
        this.professionalPhone = professionalPhone;
        this.homePage = homePage;
        this.email = email;
        this.other = other;
    }
    
    /**
     * Allows to edit the contact with the following informations
     * @param name
     * @param firstName
     * @param homeAddress
     * @param personalPhone
     * @param professionalPhone
     * @param homePage
     * @param email
     * @param other
     */
    public void editContact(String name, String firstName, String homeAddress, String personalPhone, String professionalPhone, String homePage, String email, String other) {
        this.name = name;
        this.firstName = firstName;
        this.homeAddress = homeAddress;
        this.personalPhone = personalPhone;
        this.professionalPhone = professionalPhone;
        this.homePage = homePage;
        this.email = email;
        this.other = other;
    }

    /**
     *
     * @return
     */
    public String getEmail() {
        return email;
    }

    /**
     *
     * @param email
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     *
     * @return
     */
    public String getFirstName() {
        return firstName;
    }

    /**
     *
     * @param firstName
     */
    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    /**
     *
     * @return
     */
    public String getHomeAddress() {
        return homeAddress;
    }

    /**
     *
     * @param homeAddress
     */
    public void setHomeAddress(String homeAddress) {
        this.homeAddress = homeAddress;
    }

    /**
     *
     * @return
     */
    public String getHomePage() {
        return homePage;
    }

    /**
     *
     * @param homePage
     */
    public void setHomePage(String homePage) {
        this.homePage = homePage;
    }

    /**
     *
     * @return
     */
    public String getName() {
        return name;
    }

    /**
     *
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     *
     * @return
     */
    public String getOther() {
        return other;
    }

    /**
     *
     * @param other
     */
    public void setOther(String other) {
        this.other = other;
    }

    /**
     *
     * @return
     */
    public String getPersonalPhone() {
        return personalPhone;
    }

    /**
     *
     * @param personalPhone
     */
    public void setPersonalPhone(String personalPhone) {
        this.personalPhone = personalPhone;
    }

    /**
     *
     * @return
     */
    public String getProfessionalPhone() {
        return professionalPhone;
    }

    /**
     *
     * @param professionalPhone
     */
    public void setProfessionalPhone(String professionalPhone) {
        this.professionalPhone = professionalPhone;
    }
    
}
